<% for recv in recvs -%>
  <%
    if recv.login == 'admin'
      display_name = '您这儿系统邮件'
    elsif recv.nickname.nil? 
       display_name = recv.login
     else
       display_name = recv.nickname
     end
  -%>
  <tr>
    <td>
        <% if recv.login == 'admin' -%>
            <%= "#{display_name}"%>
        <% else -%>
            <%= link_to "#{display_name}", user_path(recv.login) %>
        <% end -%>
    </td>
    <td><%= link_to "#{recv.title}", message_path(recv.id) %>
    <% if recv.is_read == 'f' -%>
       <span class="postsubinfo">(新)</span>
    <% end -%>
    </td>
    <td><%= local_date recv.created_at%></td>
    <td>
    <%= check_box("to_be_deleted", recv.id, {}, "yes", "no") %>
    </td>
  </tr>
<% end -%>
  <tr>
    <td>&nbsp;</td><td>&nbsp;</td>
    <td>
    <input name="b" type="button" value="全选" onClick="CheckAll(true);"/> &nbsp;
    <input name="c" type="button" value="全清" onClick="CheckAll(false);"/>
    </td>
    <td>
    <%= submit_tag '删除选中的邮件' %>
    </td>
  </tr>